package e.odbo.data.dsl;

public abstract class ColumnFunction<T> implements I_ColumnFunction<T> {
    protected final String funcName;
    protected final String columnName;
    protected String alise;
    protected T funcType;
    protected ColumnFunction(String funcName) {
        this.funcName = funcName;
        this.columnName =null;
    }

    protected ColumnFunction(String funcName, String columnName) {
        this.funcName = funcName;
        this.columnName = columnName;
    }

    @Override
    public String typeName() {
        return this.funcName;
    }

    @Override
    public String getColumnName() {
        return this.columnName;
    }

    public ColumnFunction<T> AS(String alise){
        this.alise=alise;
        return this;
    }

    public String getAlise(){
        return alise;
    }


    @Override
    public T getColumnType() {
        return funcType;
    }
}
